/*
 * @FilePath: /web-vue/src/api/business.js
 * @Description: 业务模块后台API
 */
import request from "@/utils/request";

/**
 * 查询【房源】
 */
const queryHouse = (parameter) => {
  return request({
    method: "GET",
    url: "api/House/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【房源】
 */
const queryOneHouse = (parameter) => {
  return request({
    method: "GET",
    url: `api/House/find/${parameter}`,
  });
};

/**
 * 新增【房源】
 */
const addHouse = (parameter) => {
  return request({
    method: "POST",
    url: "api/House/add",
    data: parameter,
  });
};

/**
 * 修改【房源】
 */
const modifyHouse = (parameter) => {
  return request({
    method: "PUT",
    url: "api/House/modify",
    data: parameter,
  });
};

/**
 * 批量删除【房源】
 */
const batchDelHouse = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/House/remove",
    data: parameter,
  });
};

/**
 * 查询【房源】字典列表
 */
const queryHouseDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/House/dictList",
    params: parameter,
  });
};

/**
 * 审批【房源】
 */
const batchAuditHouse = (parameter) => {
  return request({
    method: "PUT",
    url: "api/House/audit",
    data: parameter,
  });
};

/**
 * 搜索【房源】
 */
const searchHouse = (parameter) => {
  return request({
    method: "GET",
    url: "api/House/search",
    params: parameter,
  });
};

/**
 * 推荐【房源】
 */
const recommendHouse = (parameter) => {
  return request({
    method: "GET",
    url: "api/House/recommend",
    params: parameter,
  });
};

/**
 * 查询【房源图片】
 */
const queryHouseImage = (parameter) => {
  return request({
    method: "GET",
    url: "api/HouseImage/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【房源图片】
 */
const queryOneHouseImage = (parameter) => {
  return request({
    method: "GET",
    url: `api/HouseImage/find/${parameter}`,
  });
};

/**
 * 新增【房源图片】
 */
const addHouseImage = (parameter) => {
  return request({
    method: "POST",
    url: "api/HouseImage/add",
    data: parameter,
  });
};

/**
 * 修改【房源图片】
 */
const modifyHouseImage = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HouseImage/modify",
    data: parameter,
  });
};

/**
 * 批量删除【房源图片】
 */
const batchDelHouseImage = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/HouseImage/remove",
    data: parameter,
  });
};

/**
 * 查询【房源图片】字典列表
 */
const queryHouseImageDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/HouseImage/dictList",
    params: parameter,
  });
};

/**
 * 查询【房源类型】
 */
const queryHouseType = (parameter) => {
  return request({
    method: "GET",
    url: "api/HouseType/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【房源类型】
 */
const queryOneHouseType = (parameter) => {
  return request({
    method: "GET",
    url: "api/HouseType/find/parameter",
  });
};

/**
 * 新增【房源类型】
 */
const addHouseType = (parameter) => {
  return request({
    method: "POST",
    url: "api/HouseType/add",
    data: parameter,
  });
};

/**
 * 修改【房源类型】
 */
const modifyHouseType = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HouseType/modify",
    data: parameter,
  });
};

/**
 * 批量删除【房源类型】
 */
const batchDelHouseType = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/HouseType/remove",
    data: parameter,
  });
};

/**
 * 查询【房源类型】字典列表
 */
const queryHouseTypeDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/HouseType/dictList",
    params: parameter,
  });
};

/**
 * 查询【租房订单】
 */
const queryHousingOrder = (parameter) => {
  return request({
    method: "GET",
    url: "api/HousingOrder/retrieval",
    params: parameter,
  });
};

/**
 * 查询个人【租房订单】
 */
const queryOwnedHousingOrder = (parameter) => {
  return request({
    method: "GET",
    url: "api/HousingOrder/retrieval/owner",
    params: parameter,
  });
};

/**
 * 查询单个【租房订单】
 */
const queryOneHousingOrder = (parameter) => {
  return request({
    method: "GET",
    url: "api/HousingOrder/find/parameter",
  });
};

/**
 * 新增【租房订单】
 */
const addHousingOrder = (parameter) => {
  return request({
    method: "POST",
    url: "api/HousingOrder/add",
    data: parameter,
  });
};

/**
 * 修改【租房订单】
 */
const modifyHousingOrder = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HousingOrder/modify",
    data: parameter,
  });
};

/**
 * 批量修改【租房订单】状态
 */
const batchModifyOrderStatus = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HousingOrder/orderStatus/modify/batch",
    data: parameter,
  });
};

/**
 * TODO-lzx 修改【租房订单】基本信息（评价，回复）
 */
const modifyBaseHousingOrder = (parameter) => {
  return request({
    method: "POST",
    url: "api/HousingOrder/modify/base",
    data: parameter,
  });
};

/**
 * 支付【租房订单】
 */
const payHousingOrder = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HousingOrder/pay",
    data: parameter,
  });
};

/**
 * 批量删除【租房订单】
 */
const batchDelHousingOrder = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/HousingOrder/remove",
    data: parameter,
  });
};

/**
 * 查询【租房订单】字典列表
 */
const queryHousingOrderDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/HousingOrder/dictList",
    params: parameter,
  });
};

/**
 * 查询【租房客户评价】
 */
const queryHousingOrderAppraise = (parameter) => {
  return request({
    method: "GET",
    url: "api/HousingOrder/retrieval/appraise/list",
    params: parameter,
  });
};

/**
 * 数据统计【租房订单】
 */
const getDataStatistic = (parameter) => {
  return request({
    method: "GET",
    url: "api/HousingOrder/data/statistic",
    params: parameter,
  });
};

/**
 * 续房
 */
const continueHousingOrder = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HousingOrder/continue",
    data: parameter,
  });
};

/**
 * 退房
 */
const finishHousingOrder = (parameter) => {
  return request({
    method: "PUT",
    url: "api/HousingOrder/finish",
    data: parameter,
  });
};

/**
 * 查询【首页轮播】
 */
const queryIndexCarousel = (parameter) => {
  return request({
    method: "GET",
    url: "api/IndexCarousel/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【首页轮播】
 */
const queryOneIndexCarousel = (parameter) => {
  return request({
    method: "GET",
    url: "api/IndexCarousel/find/parameter",
  });
};

/**
 * 新增【首页轮播】
 */
const addIndexCarousel = (parameter) => {
  return request({
    method: "POST",
    url: "api/IndexCarousel/add",
    data: parameter,
  });
};

/**
 * 修改【首页轮播】
 */
const modifyIndexCarousel = (parameter) => {
  return request({
    method: "PUT",
    url: "api/IndexCarousel/modify",
    data: parameter,
  });
};

/**
 * 批量删除【首页轮播】
 */
const batchDelIndexCarousel = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/IndexCarousel/remove",
    data: parameter,
  });
};

/**
 * 查询【首页轮播】字典列表
 */
const queryIndexCarouselDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/IndexCarousel/dictList",
    params: parameter,
  });
};

/**
 * 查询【餐饮】
 */
const queryMeals = (parameter) => {
  return request({
    method: "GET",
    url: "api/Meals/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【餐饮】
 */
const queryOneMeals = (parameter) => {
  return request({
    method: "GET",
    url: "api/Meals/find/parameter",
  });
};

/**
 * 新增【餐饮】
 */
const addMeals = (parameter) => {
  return request({
    method: "POST",
    url: "api/Meals/add",
    data: parameter,
  });
};

/**
 * 修改【餐饮】
 */
const modifyMeals = (parameter) => {
  return request({
    method: "PUT",
    url: "api/Meals/modify",
    data: parameter,
  });
};

/**
 * 批量删除【餐饮】
 */
const batchDelMeals = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/Meals/remove",
    data: parameter,
  });
};

/**
 * 查询【餐饮】字典列表
 */
const queryMealsDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/Meals/dictList",
    params: parameter,
  });
};

/**
 * 查询【地区】
 */
const queryRegion = (parameter) => {
  return request({
    method: "GET",
    url: "api/Region/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【地区】
 */
const queryOneRegion = (parameter) => {
  return request({
    method: "GET",
    url: `api/Region/find/${parameter}`,
  });
};

/**
 * 新增【地区】
 */
const addRegion = (parameter) => {
  return request({
    method: "POST",
    url: "api/Region/add",
    data: parameter,
  });
};

/**
 * 修改【地区】
 */
const modifyRegion = (parameter) => {
  return request({
    method: "PUT",
    url: "api/Region/modify",
    data: parameter,
  });
};

/**
 * 批量删除【地区】
 */
const batchDelRegion = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/Region/remove",
    data: parameter,
  });
};

/**
 * 查询【地区】字典列表
 */
const queryRegionDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/Region/dictList",
    params: parameter,
  });
};

/**
 * 查询【地区】树结构
 */
const queryRegionTreeList = (parameter) => {
  return request({
    method: "GET",
    url: "api/Region/treeList",
    params: parameter,
  });
};

/**
 * 查询【旅游景点】
 */
const queryScenerySpot = (parameter) => {
  return request({
    method: "GET",
    url: "api/ScenerySpot/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【旅游景点】
 */
const queryOneScenerySpot = (parameter) => {
  return request({
    method: "GET",
    url: "api/ScenerySpot/find/parameter",
  });
};

/**
 * 新增【旅游景点】
 */
const addScenerySpot = (parameter) => {
  return request({
    method: "POST",
    url: "api/ScenerySpot/add",
    data: parameter,
  });
};

/**
 * 修改【旅游景点】
 */
const modifyScenerySpot = (parameter) => {
  return request({
    method: "PUT",
    url: "api/ScenerySpot/modify",
    data: parameter,
  });
};

/**
 * 批量删除【旅游景点】
 */
const batchDelScenerySpot = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/ScenerySpot/remove",
    data: parameter,
  });
};

/**
 * 查询【旅游景点】字典列表
 */
const queryScenerySpotDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/ScenerySpot/dictList",
    params: parameter,
  });
};

/**
 * 查询【系统参数】
 */
const querySysConfig = (parameter) => {
  return request({
    method: "GET",
    url: "api/SysConfig/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【系统参数】
 */
const queryOneSysConfig = (parameter) => {
  return request({
    method: "GET",
    url: "api/SysConfig/find/parameter",
  });
};

/**
 * 新增【系统参数】
 */
const addSysConfig = (parameter) => {
  return request({
    method: "POST",
    url: "api/SysConfig/add",
    data: parameter,
  });
};

/**
 * 修改【系统参数】
 */
const modifySysConfig = (parameter) => {
  return request({
    method: "PUT",
    url: "api/SysConfig/modify",
    data: parameter,
  });
};

/**
 * 批量删除【系统参数】
 */
const batchDelSysConfig = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/SysConfig/remove",
    data: parameter,
  });
};

/**
 * 查询【系统参数】字典列表
 */
const querySysConfigDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/SysConfig/dictList",
    params: parameter,
  });
};


/**
 * 查询【推荐结果】
 */
const queryRecommendResult = (parameter) => {
  return request({
    method: "GET",
    url: "api/RecommendResult/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【推荐结果】
 */
const queryOneRecommendResult = (parameter) => {
  return request({
    method: "GET",
    url: `api/RecommendResult/find/${parameter}`,
  });
};

/**
 * 新增【推荐结果】
 */
const addRecommendResult = (parameter) => {
  return request({
    method: "POST",
    url: "api/RecommendResult/add",
    data: parameter,
  });
};

/**
 * 修改【推荐结果】
 */
const modifyRecommendResult = (parameter) => {
  return request({
    method: "PUT",
    url: "api/RecommendResult/modify",
    data: parameter,
  });
};

/**
 * 批量删除【推荐结果】
 */
const batchDelRecommendResult = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/RecommendResult/remove",
    data: parameter,
  });
};

/**
 * 查询【推荐结果】字典列表
 */
const queryRecommendResultDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/RecommendResult/dictList",
    params: parameter,
  });
};

/**
 * 修改【推荐结果】
 */
const refreshRecommendResult = (parameter) => {
  return request({
    method: "PUT",
    url: "api/RecommendResult/refresh/recommend",
    data: parameter,
  });
};

/**
 * 查询【用户行为记录】
 */
const queryUserBehavior = (parameter) => {
  return request({
    method: "GET",
    url: "api/UserBehavior/retrieval",
    params: parameter,
  });
};

/**
 * 查询单个【用户行为记录】
 */
const queryOneUserBehavior = (parameter) => {
  return request({
    method: "GET",
    url: `api/UserBehavior/find/${parameter}`,
  });
};

/**
 * 新增【用户行为记录】
 */
const addUserBehavior = (parameter) => {
  return request({
    method: "POST",
    url: "api/UserBehavior/add",
    data: parameter,
  });
};

/**
 * 修改【用户行为记录】
 */
const modifyUserBehavior = (parameter) => {
  return request({
    method: "PUT",
    url: "api/UserBehavior/modify",
    data: parameter,
  });
};

/**
 * 批量删除【用户行为记录】
 */
const batchDelUserBehavior = (parameter) => {
  return request({
    method: "DELETE",
    url: "api/UserBehavior/remove",
    data: parameter,
  });
};

/**
 * 查询【用户行为记录】字典列表
 */
const queryUserBehaviorDictList = (parameter) => {
  return request({
    method: "GET",
    url: "api/UserBehavior/dictList",
    params: parameter,
  });
};

// 导出业务模块相关接口
export default {
  queryHouse,
  queryOneHouse,
  addHouse,
  modifyHouse,
  batchDelHouse,
  queryHouseDictList,
  batchAuditHouse,
  searchHouse,
  recommendHouse,
  queryHouseImage,
  queryOneHouseImage,
  addHouseImage,
  modifyHouseImage,
  batchDelHouseImage,
  queryHouseImageDictList,
  queryHouseType,
  queryOneHouseType,
  addHouseType,
  modifyHouseType,
  batchDelHouseType,
  queryHouseTypeDictList,
  queryHousingOrder,
  queryOwnedHousingOrder,
  queryOneHousingOrder,
  addHousingOrder,
  modifyHousingOrder,
  batchModifyOrderStatus,
  modifyBaseHousingOrder,
  payHousingOrder,
  batchDelHousingOrder,
  queryHousingOrderDictList,
  queryHousingOrderAppraise,
  getDataStatistic,
  continueHousingOrder,
  finishHousingOrder,
  queryIndexCarousel,
  queryOneIndexCarousel,
  addIndexCarousel,
  modifyIndexCarousel,
  batchDelIndexCarousel,
  queryIndexCarouselDictList,
  queryMeals,
  queryOneMeals,
  addMeals,
  modifyMeals,
  batchDelMeals,
  queryMealsDictList,
  queryRegion,
  queryOneRegion,
  addRegion,
  modifyRegion,
  batchDelRegion,
  queryRegionDictList,
  queryRegionTreeList,
  queryScenerySpot,
  queryOneScenerySpot,
  addScenerySpot,
  modifyScenerySpot,
  batchDelScenerySpot,
  queryScenerySpotDictList,
  querySysConfig,
  queryOneSysConfig,
  addSysConfig,
  modifySysConfig,
  batchDelSysConfig,
  querySysConfigDictList,
  queryRecommendResult,
  queryOneRecommendResult,
  addRecommendResult,
  modifyRecommendResult,
  batchDelRecommendResult,
  queryRecommendResultDictList,
  refreshRecommendResult,
  queryUserBehavior,
  queryOneUserBehavior,
  addUserBehavior,
  modifyUserBehavior,
  batchDelUserBehavior,
  queryUserBehaviorDictList
};
